import { defineComponent } from 'vue';
import styles from './index.module.scss';
export default defineComponent({
  name: 'EditDiv',
  props: {
    value: {
      type: String,
      default: ''
    }
  },
  setup(props, { emit }) {
    const methods = {
      onInput(e) {
        emit('input', e.target.value)
      }
    }
    return () => (
      <div
        class={styles.editContainer}
      >
        <textarea
          class={styles.editDiv}
          value={props.value}
          on-input={methods.onInput}
        />
      </div>
    )
  }
})
